﻿using ParboiledSharp.parboiled.dataobjects;

namespace ParboiledSharp.parboiled.rules
{
    class Optional : ContainerRule
    {
        public Optional(object rule)
        {
            SetRule(rule);
        }

        public Optional()
        {
        }

        internal override bool Execute(Context context)
        {
            ExecuteRule(GetRule(), context);
            return true;
        }
    }
}
